package com.zking.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zking.dao.UserInfoDao;
import com.zking.entity.UserInfo;

@Service
public class UserInfoServiceImpl implements UserInfoService{
	
	@Autowired
	private UserInfoDao userInfoDao;

	public List<UserInfo> findAll() {
		return userInfoDao.selectAll();
	}

	public UserInfo findOne(String username,String password) {
		return userInfoDao.selectByUserInfo(username, password);
	}

	public UserInfo findById(Integer id) {
		return userInfoDao.selectByPrimaryKey(id);
	}

}
